<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateDocumentosTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_idDocumentos}" for="idDocumentos" />
                    <h:inputText id="idDocumentos" value="#{documentosController.selected.idDocumentos}" title="#{bundle.CreateDocumentosTitle_idDocumentos}" required="true" requiredMessage="#{bundle.CreateDocumentosRequiredMessage_idDocumentos}"/>
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_tituloDocumento}" for="tituloDocumento" />
                    <h:inputText id="tituloDocumento" value="#{documentosController.selected.tituloDocumento}" title="#{bundle.CreateDocumentosTitle_tituloDocumento}" required="true" requiredMessage="#{bundle.CreateDocumentosRequiredMessage_tituloDocumento}"/>
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{documentosController.selected.descricao}" title="#{bundle.CreateDocumentosTitle_descricao}" />
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_fkProcesso}" for="fkProcesso" />
                    <h:selectOneMenu id="fkProcesso" value="#{documentosController.selected.fkProcesso}" title="#{bundle.CreateDocumentosTitle_fkProcesso}" required="true" requiredMessage="#{bundle.CreateDocumentosRequiredMessage_fkProcesso}">
                        <f:selectItems value="#{processoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_dataCricao}" for="dataCricao" />
                    <h:inputText id="dataCricao" value="#{documentosController.selected.dataCricao}" title="#{bundle.CreateDocumentosTitle_dataCricao}" required="true" requiredMessage="#{bundle.CreateDocumentosRequiredMessage_dataCricao}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_dataAlterado}" for="dataAlterado" />
                    <h:inputText id="dataAlterado" value="#{documentosController.selected.dataAlterado}" title="#{bundle.CreateDocumentosTitle_dataAlterado}" required="true" requiredMessage="#{bundle.CreateDocumentosRequiredMessage_dataAlterado}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateDocumentosLabel_dataExpiracao}" for="dataExpiracao" />
                    <h:inputText id="dataExpiracao" value="#{documentosController.selected.dataExpiracao}" title="#{bundle.CreateDocumentosTitle_dataExpiracao}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{documentosController.create}" value="#{bundle.CreateDocumentosSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{documentosController.prepareList}" value="#{bundle.CreateDocumentosShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateDocumentosIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
